
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>layAdmin后台管理系统模板</title>
    <link rel="stylesheet" href="../../static/layui/css/layui.css">
    <link rel="stylesheet" href="../../static/css/app.css">
    <link rel="stylesheet" href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css">
    <style>
        .layui-form{
            width: 62%;
            margin: 15px 0;
        }
    </style>
</head>
<body>
<div class="tpl-app <!--{$Think.session.app_style} .tpl-small-app 为折叠状态-->">
    <!--头部-->
    <!--{include file="public/tpl-head"/}-->
    <div class="tpl-header tpl-left">
        <div class="tpl-header-item">
            <ul class="tpl-head-nav left-item">
                <li class="tpl-head-nav-item">
                    <a href="javascript:;" class="tpl-dent"><i class="layui-icon layui-icon-shrink-right"></i></a>
                </li>
                <li class="tpl-head-nav-item">
                    <a href="javascript:;" target="_blank"><i class="layui-icon layui-icon-website"></i></a>
                </li>
                <li class="tpl-head-nav-item">
                    <a href=""><i class="layui-icon layui-icon-refresh"></i></a>
                </li>
                <li class="tpl-head-nav-item">
                    <input type="text" class="search" placeholder="搜索...">
                </li>
            </ul>
            <ul class="tpl-head-nav right-item">
                <li class="tpl-head-nav-item">
                    <a href="../msg/index.html"><i class="layui-icon layui-icon-notice"></i></a>
                    <span class="tpl-badeg"></span>
                </li>
                <li class="tpl-head-nav-item theme">
                    <a href="javascript:;"><i class="layui-icon layui-icon-theme"></i></a>
                </li>
                <li class="tpl-head-nav-item">
                    <a href="javascript:;" class="screen"><i class="layui-icon layui-icon-screen-full"></i></a>
                </li>
                <li class="tpl-head-nav-item">
                    <a href="javascript:;" class="user-item">新用户-A0001 <i class="fa caret fa-caret-down"></i></a>
                    <ul class="child-nav">
                        <span class="triangle"><em></em></span>
                        <li>
                            <a href="javascript:;"><i class="fa fa-user-o"></i>个人中心</a>
                        </li>
                        <li>
                            <a href="javascript:;"><i class="fa fa-key"></i>修改密码</a>
                        </li>
                        <li>
                            <a href="javascript:;" class="logout"><i class="fa fa-sign-out"></i>退出登陆</a>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
    <!--导航栏-->
    <div class="tpl-side">
        <div class="tpl-side-menu">
            <div class="tpl-user-image">
                <span class="user-name">layAdmin</span>
                <a href="javascript:;" class="user-logo"><img src="../../static/images/logo.jpg"></a>
            </div>
            <ul class="tpl-nav">
                <div class="tpl-nav-body">
                    <li class="nav-item">
                        <a href="../../index.html" class="nav-item-link">
                            <i class="layui-icon layui-icon-home nav-icon"></i>
                            <span>主页</span>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="../auth/index.html" class="nav-item-link">
                            <i class="layui-icon layui-icon-user nav-icon"></i>
                            <span>权限控制台</span>
                            <i class="fa fa-caret-right nav-right-icon"></i>
                        </a>
                        <ul class="child-nav">
                            <li class="child-nav-item">
                                <a href="../auth/auth_add.html">
                                    <i class="fa fa-plus-circle"></i>
                                    <span>添加权限</span>
                                </a>
                            </li>
                            <li class="child-nav-item">
                                <a href="../auth/rule_index.html">
                                    <i class="fa fa-users"></i>
                                    <span>角色组管理</span>
                                </a>
                            </li>
                            <li class="child-nav-item">
                                <a href="../auth/user_index.html">
                                    <i class="fa fa-user-o"></i>
                                    <span>用户管理</span>
                                </a>
                            </li>
                        </ul>
                    </li>
                    <li class="nav-item">
                        <a href="../control/index.html" class="nav-item-link">
                            <i class="layui-icon layui-icon-set nav-icon"></i>
                            <span>设置</span>
                            <i class="fa fa-caret-right nav-right-icon"></i>
                        </a>
                        <ul class="child-nav">
                            <li class="child-nav-item">
                                <a href="../control/index.html">
                                    <i class="fa fa-cogs"></i>
                                    <span>网站设置</span>
                                </a>
                            </li>
                            <li class="child-nav-item">
                                <a href="../control/tdk.html">
                                    <i class="fa fa-edge"></i>
                                    <span>TDK管理</span>
                                </a>
                            </li>
                            <li class="child-nav-item">
                                <a href="../push/push_message.html">
                                    <i class="fa fa-comment-o"></i>
                                    <span>推送消息</span>
                                </a>
                            </li>
                            <li class="child-nav-item">
                                <a href="../mysql/index.html">
                                    <i class="fa fa-table"></i>
                                    <span>数据表管理</span>
                                </a>
                            </li>
                            <li class="child-nav-item">
                                <a href="../control/site_index.html">
                                    <i class="fa fa-theme"></i>
                                    <span>自定义UI管理</span>
                                </a>
                            </li>
                            <li class="child-nav-item">
                                <a href="../email/index.html">
                                    <i class="fa fa-envelope-o"></i>
                                    <span>邮件管理</span>
                                </a>
                            </li>
                            <li class="child-nav-item">
                                <a href="../control/module_index.html">
                                    <i class="fa fa-gear"></i>
                                    <span>模块管理</span>
                                </a>
                            </li>
                        </ul>
                    </li>
                    <li class="nav-item">
                        <a href="../auth/index.html" class="nav-item-link">
                            <i class="layui-icon layui-icon-user nav-icon"></i>
                            <span>用户</span>
                            <i class="fa fa-caret-right nav-right-icon"></i>
                        </a>
                        <ul class="child-nav">
                            <li class="child-nav-item">
                                <a href="../user/login.html">
                                    <i class="fa fa-user-o"></i>
                                    <span>登陆页面</span>
                                </a>
                            </li>
                            <li class="child-nav-item">
                                <a href="../user/register.html">
                                    <i class="fa fa-user"></i>
                                    <span>注册页面</span>
                                </a>
                            </li>
                        </ul>
                    </li>
                </div>
            </ul>
            <ul class="tpl-bottom-nav">
                <li class="tpl-head-nav-item">
                    <a href="javascript:;"><i class="layui-icon layui-icon-notice"></i></a>
                </li>
                <li class="tpl-head-nav-item theme">
                    <a href="javascript:;"><i class="layui-icon layui-icon-theme"></i></a>
                </li>
                <li class="tpl-head-nav-item">
                    <a href="javascript:;"><i class="layui-icon layui-icon-username"></i></a>
                </li>
                <li class="tpl-head-nav-item">
                    <a href="javascript:;"><i class="layui-icon layui-icon-edit"></i></a>
                </li>
            </ul>
        </div>
    </div>
    <div class="tpl-body">
        <div class="tpl-show">
            <div class="tpl-sub-header">
                <!--面包屑-->
                <!--{include file="public/tpl-crumbs"/}-->
                <div class="crumbs">
                    <a href="#">首页</a>
                    <i>/</i>
                </div>
            </div>
            <div class="tpl-fluid">
                <div class="tpl-pannel">
                    <table class="layui-table" lay-even="" lay-skin="row">
                        <colgroup>
                            <col width="20%">
                            <col width="45%">
                            <col width="120">
                            <col>
                        </colgroup>
                        <thead>
                        <tr>
                            <th>权限组名称</th>
                            <th>权限组路径</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>游客</td>
                            <td>auth-index,auth-rule_index,control-index,index-index</td>
                            <td>启用</td>
                            <td class="link-item"><a href="rule_update.html?id=3">修改</a><a tag-id="3" href="javascript:;" class="delete">删除</a></td>
                        </tr>
                        <tr>
                            <td>管理员</td>
                            <td>auth-index,auth-rule_index,control-index,auth-user_index,control-index,index-index,control-tdk,control-module_add,article-index,article-article_add,article-article_update,currs-index,currs-curr_add,currs-curr_update,currs-module_index,currs-module_add,currs-upload,currs-curr_upload,currs-curr_upload_update,currs-curr_index,currs-curr_del,currs-curr_auto_update,currs-curr_json,currs-curr_child_del,msg-index,msg-detail,msg-mail_json,msg-send_msg,push-push_message,mysql-index,book-index,book-book_add,book-book_update,mysql-control</td>
                            <td>启用</td>
                            <td class="link-item"><a href="rule_update.html?id=2">修改</a><a tag-id="2" href="javascript:;" class="delete">删除</a></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <!--侧边栏-->
    {include file="public/tpl-right-bar"/}
</div>
<script src="_STATIC_/admin/js/jquery.min.js"></script>
<script src="_STATIC_/admin/js/layer.js"></script>
<script src="_STATIC_/admin/layui/layui.js"></script>
<script src="_STATIC_/admin/js/app.js"></script>
<script>
    layui.use(['jquery','table'],function() {
        var $ = layui.jquery;
        $('.delete').on('click',function(){
            let id = $(this).attr("tag-id");
            let dom = $(this);
            layer.msg('确定要删除吗？', {
                time: 0,
                btn: ['确定', '算了'],
                yes: function(index){
                    layer.close(index);
                    $.ajax({
                        url: "{:url('rule_del')}",
                        type: 'post',
                        data: {
                            id: id
                        },
                        success: function (d) {
                            layer.msg(d.msg);
                            layer.closeAll('loading');
                            if (d.code == 0) {
                                dom.parents('tr').remove();
                            }
                        },
                         error: function (e) {
                            layer.msg(e);
                         }
                    })
                }
            });
        })
    })
</script>
</body>
</html>